/**
 * 
 */
package com.ideeli.hwz.exe;

import org.apache.log4j.Logger;
import org.springframework.context.ApplicationContext;

import com.ideeli.hwz.context.HWZcontext;
import com.ideeli.hwz.service.HWZSubmitService;

/**
 * @author sa
 *
 */
public class HWZSubmitter
{
	private static final Logger logger = Logger.getLogger(HWZSubmitter.class);
	
	public static void main(String arg[]) throws Exception
	{
		ApplicationContext context =HWZcontext.getApplicationContext();
		
		logger.info("Context initialized...");
		HWZSubmitService hwzSubmitService=context.getBean("hwzsubmitterservice",HWZSubmitService.class);
	
		long startTime=System.currentTimeMillis();
		logger.warn("startTime : "+startTime);
		
		hwzSubmitService.process();
		
		long endTime=System.currentTimeMillis();
		logger.warn("endTime : "+endTime);
		
		
		logger.warn("Total time : "+((endTime-startTime)/1000)/60 + " minutes");
		
	}

}
